#include <stdio.h>

void stack(const int);
void stackOverflow();

int main(int argc, char *argv[]) {
    for (int i = 1024; i <= 10 * 1024 *1024; i++) {
        stack(i);
    }
}

void stack(const int size) {
    char tmp[size];
    printf("sizeof tmp: %d\n", sizeof(tmp));
}

void stackOverflow() {
    char tmp[8192 * 1024];
    printf("sizeof tmp: %d\n", sizeof(tmp));
}
